<?php

namespace App\Jobs;

use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldBeUnique;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Facades\Log;

class GoodsOrderCancelJobs implements ShouldQueue
{
    use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;

    public array $orderData;

    //设置超时时间
//    public int $timeout = 60;

    /**
     * 任务支持错误，可尝试的次数。
     *
     * @var int
     */
//    public $tries = 5;



    /**
     * Create a new job instance.
     *
     * @return void
     */
    public function __construct($data = [])
    {

        $this->orderData = $data = [];
//        $this->onQueue('project-compute');
    }

    /**
     * Execute the job.
     *
     * @return void
     */
    public function handle()
    {
        //
        $data = $this->orderData;


        xdebug('消息队列','','/jobs/');

        Log::error('写入商品记录发生错误,错误原因:' );

    }
}
